package com.aeasycredit.test;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
        String s = "# LOS SQL變更說明";
        System.out.println(s.matches("(^([0-9]+\\.)+.*)|(^#+.*)"));
        
//        Pattern pattern = Pattern.compile("\\[.*?\\]\\(.*?\\)");
//        Matcher matcher = pattern.matcher(s);
//        while(matcher.find()) {
//        	System.out.println("============");
//        	System.out.println(matcher.group(0));
//        	String target = matcher.group(0);
//        	String text = target.substring(1, target.indexOf("]"));
//        	String url = target.substring(target.indexOf("(") + 1, target.length() - 1);
//        	String result = String.format("<a href='%s'>%s</a>", text, url);
//        	System.out.println(result);
//        }
        
//        String str = "(a)(b)(c)(d)(e)";  
//        String regex = "\\(.*?\\)";  
//        Pattern pattern = Pattern.compile(regex);  
//        Matcher matcher = pattern.matcher(str);  
//        System.out.println("replace: "+str.replaceAll(regex, "O"));  
//        while (matcher.find()) {  
//            System.out.println("matcher: " + matcher.group(0));  
//        }  
    }
}
